package com.draven.mybatis.session;

import com.draven.mybatis.executor.DravenExecutor;
import org.apache.ibatis.cursor.Cursor;


import java.util.List;

public class DravenDefaultSqlSession implements DravenSqlSession {

  private final DravenConfiguration configuration;
  private final DravenExecutor executor;

  private final boolean autoCommit;
  private boolean dirty;
  private List<Cursor<?>> cursorList;

  public DravenDefaultSqlSession(DravenConfiguration configuration, DravenExecutor executor, boolean autoCommit) {
    this.configuration = configuration;
    this.executor = executor;
    this.dirty = false;
    this.autoCommit = autoCommit;
  }

  @Override
  public <T> T getMapper(Class<T> type) {
    return configuration.getMapper(type, this);
  }


}
